package com.yuer.tools.myfileziptools.pojo.common.request;

import com.yuer.tools.myfileziptools.pojo.common.response.constants.ResponseBaseCodeConstants;
import com.yuer.tools.myfileziptools.utils.exception.support.ParamsValidateException;
import lombok.Data;
import lombok.ToString;

/**
 * @author hyh
 * @Classname MenuRequest
 * @Description 菜单参数请求
 * @Date 2020/2/28 10:29
 */
@Data
@ToString(callSuper = true)
public class MenuRequest extends AbstractRequest {


    private String operationName;
//    private Integer parentId;
//    private String url;
//    private String rankno;
//    private String deleflag;
//    private Integer order1;
//    private String logoDescribe;

    public MenuRequest() {
    }

    public MenuRequest(String operationName) {
        this.operationName = operationName;
    }

    @Override
    public void checkParams() {
        if (operationName == null){
            throw new ParamsValidateException(
                    ResponseBaseCodeConstants.INVALID_PARAMETER.getCode(),
                    ResponseBaseCodeConstants.INVALID_PARAMETER.getMsg()
            );
        }
    }
}
